<!DOCTYPE HTML>
<html>
	<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        {if isset($row)}      
        	{seo controller=$strController action=$strAction data=$row}
        {else}
	        {seo controller=$strController action=$strAction}
       	{/if}
        <link rel="shortcut icon" href="favicon.ico"/>
        <link href="{$smarty.const.HOST_STATICS}css/vfriend.css?{$smarty.const.CSS_UPDATE}" rel="stylesheet" type="text/css" media="all" />        
        <link href="{$smarty.const.HOST_STATICS}css/common.css?{$smarty.const.CSS_UPDATE}" rel="stylesheet" type="text/css" media="all"/>
        <link href="{$smarty.const.HOST_STATICS}css/dialog.css?{$smarty.const.CSS_UPDATE}" rel="stylesheet" type="text/css" media="all" />
        <link href="{$smarty.const.HOST_STATICS}css/avatar.css?{$smarty.const.CSS_UPDATE}" rel="stylesheet" type="text/css" media="all" />
        <link href="{$smarty.const.HOST_STATICS}css/jquery-ui.css?{$smarty.const.CSS_UPDATE}" rel="stylesheet" type="text/css" media="all"/>
        <link href="{$smarty.const.HOST_STATICS}css/jquery.jscrollpane.css?{$smarty.const.CSS_UPDATE}" rel="stylesheet" type="text/css" media="all"/>
        {if is_array($arrCSS)}
            {section name=i loop=$arrCSS}
            	<link href="{$arrCSS[i]}?{$smarty.const.CSS_UPDATE}" rel="stylesheet" type="text/css" media="all"/> 
            {/section}
        {/if}               
        <script type="text/javascript" language="javascript">
			var HOST_VFRIEND 		= '{$smarty.const.HOST_VFRIEND}';
			var HOST_STATICS	 	= '{$smarty.const.HOST_STATICS}';
			var maxImgSize			= '{$smarty.const.IMAGE_SIZE}';
			var intHexId			= '{$AppUI->hex}';
			var	strMsg				= '{$strMsg}';			
			var	strError			= '{$strError}';
			var strPhpController	= '{if isset($strController)}{$strController}{/if}';
			var strPhpAction		= '{if isset($strAction)}{$strAction}{/if}';
			var strGeneralCode		= '{php}echo session_id();{/php}';			
       	</script>          
        <script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/library/jquery-1.7.1.js"></script>
        <script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/library/jquery.blockui.js"></script>
        {if $arrJSBefore} 	
            {section name=i loop=$arrJSBefore}
                <script type="text/javascript" language="javascript" src="{$arrJSBefore[i]}?{$smarty.const.JS_UPDATE}"></script>
            {/section}
        {/if}
        <script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/library/common.js?{$smarty.const.JS_UPDATE}"></script>
        <script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/scrollbar/jquery.mousewheel.min.js?{$smarty.const.JS_UPDATE}"></script>
        <script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/scrollbar/jquery.jscrollpane.min.js?{$smarty.const.JS_UPDATE}"></script>
        <script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/library/fixed.js?{$smarty.const.JS_UPDATE}"></script>
    </head>
    <body>    	
        <div id="wrapperVfriend">               
            <div id="vfriendHeader">
                <div id="vfriendHeaderContainer">                     
                    <div id="vfriendHeaderContent"> 
                        <div class="logoVfriend">
                            <h1><a href="{$smarty.const.HOST_VFRIEND}"><img src="{$smarty.const.HOST_STATICS}img/logo/vfriend-close-beta.png" border="0" width="113" height="46" alt="Welcome to {$smarty.const.DOMAIN}" /></a></h1>
                        </div>
                        <div class="menuVfriend">                        	
                            <ul class="mainMenu{if $strController == "new"} lMargin0{/if}">
                                <li{if $strController == "new"} class="lMargin0"{/if}>
                                   	<a href="{$smarty.const.HOST_VFRIEND}" {if $strController == "index" && $strAction == "index"}class="active"{/if}>
                                   		<strong class="{if $AppUI->id <= 0}home{/if}">{if $AppUI->id>0}Kết bạn{else}Trang chủ{/if}</strong>
                                   	</a>
                                </li>
                                
                                <li>
                                	<a href="{if $AppUI->id > 0}{$smarty.const.LINK_MEMBER_INDEX}{else}{$smarty.const.LINK_INDEX_LOGIN}{/if}" {if $strController == "blog" || $strController == "fullhouse" || $strController == "member" || $strController == "product"}class="active"{/if}><strong>Kết bạn</strong></a>                                            
                                </li>
                                *}
                                <li>
                                    <a href="{$smarty.const.LINK_NEWS}" {if $strController == "new"}class="active"{/if}><strong>Điểm tin</strong></a>
                                </li>                                
                                <li>
                                	<a href="{$smarty.const.LINK_PLACE}" {if $strController == "place"}class="active"{/if}><strong>Ăn &amp; chơi</strong></a>
                               	</li>                                
                            </ul>
                            {if $AppUI->id > 0}
                                <div class="topNavigation">
                                    <ul class="userMenu">
                                        <li class="firstChild">
                                            {image userid=$AppUI->id viewid=$AppUI->id type=1 small=2 class="border30 lFloat"}                                        	
                                            <a href="{vfriend_username userid=$AppUI->id viewid=$AppUI->id}" class="fullHouse lFloat">{$AppUI->fullnamevn}</a>
                                            <ul>
                                                <li>
                                                    <a href="{$smarty.const.LINK_ACCOUNT}">Tài khoản</a>
                                                </li>
                                                <li>
                                                    <a href="{$smarty.const.LINK_ACCOUNT_BASIC}">Hồ sơ &amp; ảnh đại diện</a>
                                                </li>
                                                <li>
                                                    <a href="{$smarty.const.LINK_ACCOUNT_NOTIFICATION}">Riêng tư</a>
                                                </li>
                                                <li>
                                                    <a href="{$smarty.const.HOST_VFRIEND}index/logout">Thoát</a>
                                                </li>
                                            </ul>
                                        </li>  
                                    </ul>
                                </div> 
                            {elseif $AppUI->id <=0 && ($strController != "index" || ($strController == "index" && $strAction != "index" && $strAction != "loginerr"))}
                             	<div class="topNavigation">
                                	<ul class="loginMenu"> 
                                    	<li><a href="{$smarty.const.LINK_INDEX_REGISTER}"><strong>Đăng ký</strong></a></li>
                                        <li>
                                        	<a href="javascript:;" class="login"><strong>Đăng nhập</strong></a>
                                            <ul>
                                            	<li>
                                                	<form name="loginForm" id="loginForm" method="post" onsubmit="return actionLogin(this);" enctype="multipart/form-data" action="{$smarty.const.HOST_VFRIEND}index/login">
                                                        <input type="hidden" name="ptypelogin" id="ptypelogin" value="1"/>
                                                        <input type="hidden" name="ppassword" id="ppassword" class="text"/>
                                                        <div class="formHeaderLogin">
                                                            <div class="userInput">
                                                                <label for="pemail">Địa chỉ E-mail:</label>
                                                                <input type="text" class="text" name="pemail" value="{if isset($smarty.session.uemail)}{$smarty.session.uemail|escape}{elseif isset($ckEmail)&&$ckEmail!=''}{$ckEmail}{/if}" id="pemail" />
                                                            </div>
                                                            <div class="userInput">
                                                                <label for="ppassword_type">Mật khẩu đăng nhập:</label>
                                                                <input type="password" class="text" name="ppassword_type" id="ppassword_type" value="{if isset($smarty.cookies.LOGIN_PASS)&&$smarty.cookies.LOGIN_PASS!=''&&isset($ckRemember)&&$ckRemember==1}{$smarty.cookies.LOGIN_PASS|base64D|base64D}{/if}" />
                                                            </div>
                                                            <div class="userInput">                                                        	
                                                                <input type="checkbox" value="1" class="chk" name="prememberme_header" id="prememberme_header" tabindex="3" {if isset($ckRemember)&&$ckRemember==1}checked="checked"{/if} />
                                                                <label class="chk" for="prememberme_header">Ghi nhớ đăng nhập</label>
                                                                <input type="image" src="{$smarty.const.HOST_STATICS}img/btn/he-login.gif" class="rFloat" alt="Đăng nhập" />
                                                            </div>
                                                            <div class="userInput line">
                                                            	<a href="{$smarty.const.LINK_INDEX_FORGET_PASSWORD}" class="forgetPassword">Quên mật khẩu</a>
                                                                <a href="{$smarty.const.LINK_INDEX_GETCODE_ACCOUNT}" class="receiveCode">Nhận lại mã kích hoạt</a>
                                                            </div>
                                                        </div>
                                                 	</form>
                                                </li>
                                          	</ul>
                                      	</li>                                    
                                    </ul>
                                </div>
                            {/if}
                        </div>
                    </div>
                </div>
            </div>
                    